package com.gaogzhen.juc.visibility;

import lombok.extern.slf4j.Slf4j;

import java.net.URLDecoder;
import java.util.concurrent.TimeUnit;

@Slf4j(topic = "c.Test01")
public class Test01 {
    static boolean run = true;

    public static void main(String[] args) throws InterruptedException {
       test();
    }

    public static void test01() throws InterruptedException {
        Thread t = new Thread(() -> {
            while (run) {
                // 循环体
//                System.out.println("循环体");
            }
        });
        t.start();
        TimeUnit.SECONDS.sleep(1);
        log.debug("线程t退出循环...");
        run = false;
    }

    public  static void test() {
        URLDecoder decoder = new URLDecoder();
        String decode = URLDecoder.decode("http://authserver.qhwszy.edu.cn/authserver/login?service=http%3A%2F%2Fehall.qhwszy.edu.cn%2Flogin%3Fservice%3Dhttp%3A%2F%2Fehall.qhwszy.edu.cn%2FappShow%3FappId%3D6239879656357579");
        System.out.println(decode);
    }
}
